<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>下游用户信息列表</title>
    <link rel="icon" href="favicon.ico" type="image/x-icon"/>
<#include "../template/include/assign.ftl">
<#include "../template/include/source.ftl">
<#include "../template/template_listPage.ftl">
    <link href="${web_static}/admin/css/list.css" rel="stylesheet" type="text/css"/>
    <style type="text/css">
        .page {
            float: right;
            padding-top: 15px;
            margin-right: 15px;
        }
    </style>

    <script type="text/javascript">
        $(document).ready(function () {
            $('#searchButton').click(
                    function () {
                        $('#currentPage_listForm').val('1');
                    }
            );
        <#if actionErrors??&&(actionErrors?size > 0)>
            $.dialog({type: "warn", content: "<#list errorMessages as list>${list}<br></#list>",
                modal: true, autoCloseTime: 3000});
        </#if>
        });
        function editUser(id) {
            var userNo = $('#userNo').val();
            var userName = $('#userName').val();
            var templateName = $('#templateName').val();
            var url = "${web_base}/game/downstream_user!toEdit.htm?id=" + id;
            if (userNo != null && userNo != '') {
                url = url + "&userNo=" + userNo;
            }
            if(userName != null && userName != ''){
                url = url + "&userName=" + userName;
            }
            if (templateName != null && templateName != '') {
                url = url + "&templateName=" + templateName;
            }
            //$('#listForm').attr("action","url");
            //$('#listForm').submit();
            document.forms[0].action = encodeURI(url);
            document.forms[0].submit();
        }
    </script>
</head>
<body class="list">
<div class="body">
    <div class="listBar">
        <h1><span class="icon">&nbsp;</span>下游用户信息管理&nbsp;<span class="pageInfo"></span></h1>
    </div>
<@pageList page=(page!) id="listForm" action="${web_base}/game/downstream_user!list.htm" query="downQuery" isEmpty=true>
    <div class="operateBar">
        <input type="button"  onclick="location.href='${web_base}/game/downstream_user!add.htm'"
               value="添加用户信息"/>
        查找:
        用户编号：<input type="text" name="downQuery.userNo" id="userNo" value="<#if downQuery??>${(downQuery.userNo)!}</#if>"/>
        用户名称：<input type="text" name="downQuery.userName" id="userName"  value="<#if downQuery??>${(downQuery.userName)!}</#if>"/>
        <#--模版编号：<input type="text" name="downQuery.templateCode"-->
                    <#--value="<#if downQuery??>${(downQuery.templateCode)!}</#if>"/>-->
        模版名称：<input type="text" name="downQuery.templateName" id="templateName"
                    value="<#if downQuery??>${(downQuery.templateName)!}</#if>"/>
        <input type="submit" id="searchButton" class="searchButton" value=""/>
    </div>
    <table class="listTable">
        <tr>
            <th>
                <span class="sort" name="userNo">用户编号</span>
            </th>
            <th>
                <span class="sort" name="userName">用户名称</span>
            </th>
            <#--<th>-->
                <#--<span class="sort" name="contractNo">合同编号</span>-->
            <#--</th>-->
            <#--<th>-->
                <#--<span class="sort" name="templateCode">模版编号</span>-->
            <#--</th>-->
            <th>
                <span class="sort" name="templateName">模版名称</span>
            </th>
            <th>
                <span class="sort" name="signTime">签约时间</span>
            </th>
            <th>
                <span class="sort" name="expireTime">签约到期时间</span>
            </th>
            <th>
                <span class="sort" name="insertTime">录入时间</span>
            </th>
            <th>
                <span class="sort" name="modifyTime">最后修改时间</span>
            </th>
            <th>
                <span class="sort" name="operator">操作员账号</span>
            </th>
            <th width="80">操&nbsp;&nbsp;作
            <th/>
        </tr>

        <#if page?? && page.list?? && (page.list?size gt 0)>
            <#list page.list as obj>
                <tr>
                    <td>
                    ${(obj.userNo)!}
                    </td>
                    <td>
                    ${(obj.userName)!}
                    </td>
                    <#--<td>-->
                    <#--${(obj.contractNo)!}-->
                    <#--</td>-->
                    <#--<td>-->
                    <#--${(obj.templateCode)!}-->
                    <#--</td>-->
                    <td>
                    ${(obj.templateName)!}
                    </td>
                    <td>
                    ${(obj.signTime)!}
                    </td>
                    <td>
                    ${(obj.expireTime)!}
                    </td>
                    <td>
                    ${(obj.insertTime)!}
                    </td>
                    <td>
                    ${(obj.modifyTime)!}
                    <td>
                    ${(obj.operator)!}
                    </td>
                    <td width="80">
                        <span class="spanLink" onclick="editUser('${(obj.id)!}');" title="编辑">[编辑]</span>
                        <a href="${web_base}/game/downstream_user!detail.htm?id=${(obj.id)!}" title="详情">[详情]</a>
                    </td>
                </tr>
            </#list>
        </#if>
    </table>

    <#if page?? && page.list?? && (page.list?size <= 0)>
        <div class="noRecord">
         	   没有找到任何记录!
        </div>
    </#if>
</@pageList>
</div>

</body>
</html>